# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1292929586.45962
_template_filename=u'/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/map/maploc_module_locinfo.mako'
_template_uri=u'map/maploc_module_locinfo.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = []


def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        c = context.get('c', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'<div id="loc_info" style="background:none repeat scroll 0 0 #FFF6ED;padding:10px;">\n\t<script type="text/javascript">\n\t\t$(document).ready(function(){\n\t\t\tvar totalRateScore = parseInt($(".page_variable div[var_name=\'info\']").attr("total_rate_score"));\n\t\t\tvar rateCount = parseInt($(".page_variable div[var_name=\'info\']").attr("rate_count"));\n\t\t\tif (rateCount == 0) $("#rate_score").html("\u6682\u65e0");\n\t\t\telse $("#rate_score").html(Math.round(100.0 * totalRateScore / rateCount) / 100.0 + "\uff08\u6765\u81ea" + rateCount + "\u4f4d\u7528\u6237\uff09");\n')
        # SOURCE LINE 8
        if c.loginUser != None :
            # SOURCE LINE 9
            __M_writer(u'\t\t\t\tvar myRating = parseInt($(".page_variable div[var_name=\'info\']").attr("my_rating"));\n\t\t\t\t$("#rater").rater("/map/addSchoolMapLocRating", {curvalue : ')
            # SOURCE LINE 10
            __M_writer(filters.decode.utf8(c.myRating))
            __M_writer(u', getParameter : {id : $(".page_variable div[var_name=\'info\']").attr("maploc_id")}}, updateRating);\n\t\t\t\tfunction updateRating(rating){\n\t\t\t\t\tif (myRating == 0) rateCount ++;\n\t\t\t\t\ttotalRateScore = totalRateScore - myRating + parseInt(rating);\n\t\t\t\t\tmyRating = rating;\n\t\t\t\t\t$("#rate_score").html(Math.round(100.0 * totalRateScore / rateCount) / 100.0 + "\uff08\u6765\u81ea" + rateCount + "\u4f4d\u7528\u6237\uff09");\n\t\t\t\t\t$("#rater").html("");\n\t\t\t\t\t$("#rater").rater("/map/addSchoolMapLocRating", {curvalue : rating, getParameter : {id : $(".page_variable div[var_name=\'info\']").attr("maploc_id")}}, updateRating);\n\t\t\t\t}\n')
            pass
        # SOURCE LINE 20
        __M_writer(u'\t\t});\n\t</script>\n\t<style type="text/css">\n\t\t.table_loc_info .label{width:80px;padding-right:20px;font-weight:bold;color:#E07265;text-align:right;}\n\t</style>\n\t<table class="table_loc_info">\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class="label">\u5730\u5740\uff1a</td>\n\t\t\t\t<td>')
        # SOURCE LINE 29
        __M_writer(filters.decode.utf8(c.maploc.address))
        __M_writer(u'</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class="label">\u8bc4\u5206\uff1a</td>\n\t\t\t\t<td id="rate_score"></td>\n\t\t\t</tr>\n')
        # SOURCE LINE 35
        if c.loginUser != None :
            # SOURCE LINE 36
            __M_writer(u'\t\t\t\t<tr>\n\t\t\t\t\t<td class="label">\u6211\u7684\u8bc4\u5206\uff1a</td>\n\t\t\t\t\t<td><div id="rater"></div></td>\n\t\t\t\t</tr>\n')
            pass
        # SOURCE LINE 41
        __M_writer(u'\t\t </tbody>\n\t</table>\n</div>')
        return ''
    finally:
        context.caller_stack._pop_frame()


